import React, { useState, useEffect } from 'react'
import { Card } from 'antd'
import Address from './components/address'
import SelfPickup from './components/selfPickup'
import Template from './components/template'
const LogisticsConfiguration = (props) => {
    const [active, setActive] = useState('template')
    const renderContent = {
        address: <Address></Address>,
        selfPickup: <SelfPickup></SelfPickup>,
        template: <Template></Template>,
    }[active]
    const tabList = [
        // {
        //     key: 'address',
        //     tab: '发货地址',
        // },
        {
            key: 'template',
            tab: '运费模板',
        },
        // {
        //     key: 'selfPickup',
        //     tab: '到店自提',
        // },

    ];

    return <Card style={{ width: '100%' }}
        tabList={tabList}
        activeTabKey={active}
        onTabChange={key => {
            setActive(key);
        }}>
        {renderContent}
    </Card>
}
export default LogisticsConfiguration